﻿using System;

namespace PhiStore.Storage
{
    [Serializable]
    internal class ObjectInformation
    {
        public long Count = 0L;
        public long FirstIndex = 0L;
        public ulong Version = 0L;
       
        //later version for a collection
        public ObjectInformation(ulong version, long count, long firstIndex)
        {
            this.Version = version;
            this.Count = count;
            this.FirstIndex = firstIndex;
        }

        public ulong NextVersion
        {
            get
            {
                return Version + 1L;
            }
        }

        public override string ToString()
        {
            return Version + " " + FirstIndex + " " + Count;
        }

        public ObjectInformation Copy()
        {
            return new ObjectInformation(Version, Count, FirstIndex);
        }

    }
}
